home *** CD-ROM | disk | FTP | other *** search
- Path: mayne.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c,comp.unix.programmer,comp.os.linux.development.apps
- Subject: Re: HELP: I/O via LPT1:
- Date: 11 Mar 1996 15:13:54 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4i2c3iINNm3u@mayne.ugrad.cs.ubc.ca>
- References: <Do2nMH.5A1@ecf.toronto.edu>
- NNTP-Posting-Host: mayne.ugrad.cs.ubc.ca
-
- In article <Do2nMH.5A1@ecf.toronto.edu>,
- BREWSTER NEIL VINAY <brewste@ecf.toronto.edu> wrote:
- > I am working on a project which requires that I interface a
- >Linux machine with external circuitry. I have read several faqs (available
- >at www.paranoia.com/~filipg for those interested), and understand how
- >to go about doing this. The only problem is, I do not know the syntax
- >(in C) to do it! The faqs give plenty of examples in assembler, basic,
- >Turbo Pascal, Microsoft C, etc. I am using gcc and the standard libraries...
-
- Linux has no "LPT1:"; that is a DOS name. It does have a device driver for the
- parallel port. When building a kernel, you conditionally compile this. You
- should be able to do what you want by going through the driver---the driver
- code is so small you might as well just decipher it directly instead of looking
- for documentation.
-
- Why don't you ask in a Linux or UNIX newsgroup? This doesn't have much to do
- with the C language.
-
- >Does anyone know the equivalent of inport() and outport()?
-
- These are not standard C functions. C users on machines that don't have
- separate I/O instructions might not even have a clue what ports are.
-
- >Alternatively - is there a way to embed assembler code in a C program?
-
- Read the GCC and GAS documentation. Try some GNU-related newsgroups for that,
- not comp.lang.c. You shouldn't have to use assembly code unless an existing
- device driver is really not suitable for your project.
- --
-
-